//
//  AlertViewController.m
//  League
//
//  Created by JinHvung on 2018/2/12.
//  Copyright © 2018年 ciyuanjuzhen. All rights reserved.
//

#import "AlertViewController.h"

@interface AlertViewController ()

@end

@implementation AlertViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.confirmBtn addTarget:self action:@selector(confirmBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.cancelBtn addTarget:self action:@selector(cancelBtnClick:) forControlEvents:UIControlEventTouchUpInside];
}

- (void)confirmBtnClick:(id)sender {
    if(self.block){
        self.block(YES);
    }
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (void)cancelBtnClick:(id)sender {
    if(self.block){
        self.block(NO);
    }
    [self dismissViewControllerAnimated:YES completion:nil];
}

@end
